package com.deshan.websys.api.controller;

import com.deshan.websys.code.entry.WsEndpoint;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;

@Controller
@RequestMapping("/send")
public class WsController {
//    @Resource
//    WsEndpoint webSocketServer;

    @ResponseBody
    public boolean demo(@RequestParam("userId") String userId, @RequestParam("message") String mesage) {
        //给前端web推送数据
//        webSocketServer.sendInfo(userId, mesage);
        return true;
    }

}
